#include "Scene.h"


Scene::Scene(char * name = "undefined"):Object(name)
{
	std::cout << "Scene \"" << name << "\" wurde erstellt" << std::endl;
}


Scene::~Scene(void)
{
}

void Scene::render(glm::mat4 ProjectionMatrix, glm::mat4 ViewMatrix)
{
	
	//	Render all children
	for (Object* &m : children)
	{
		//std::cout << "Render Object: " << m->GetName() << std::endl;
		m->render(ProjectionMatrix, ViewMatrix);
	}
}

void Scene::renderToFrameBuffer()
{
	//	Render all children to framebuffer
	for (Object* &m : children)
	{
		m->renderToFrameBuffer();
	}
}

void Scene::debugRender()
{
	//	Debug render all children to framebuffer
	for (Object* &m : children)
	{
		m->debugRender();
	}
}

glm::vec3 Scene::getPosition()
{
	return position;
}

void Scene::setPosition(float x, float y, float z)
{
	
}

//__________ Static initialization _____________
const glm::vec3 Scene::position = glm::vec3(0,0,0);